package edu.ynu.e_platform.common.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * @author manwen Yang
 * 实现逻辑删除（软删除）
 */
@Getter
@Setter
@MappedSuperclass  //标记为公共属性
public abstract class LogicEntity extends BaseEntity{

    @Column(insertable = false)
    protected Date deletedTime;

    @Column(insertable = false,
            nullable = false,
            columnDefinition = "INT default 0")
    protected Integer isDeleted;
}
